<template>
  <div class="buttonFlash">
    <slot></slot>
  </div>
</template>
<script lang="ts">
import { defineComponent, ref } from "vue";
export default defineComponent({
  props: {},
});
</script>
<style lang="scss" scoped>
.buttonFlash {
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  line-height: 2.5rem;
  padding: 0.5rem 2rem;
  color: #fff;
  background-image: linear-gradient(
    to right,
    #03a9f4,
    #f441a5,
    #ffeb3b,
    #09a8f4
  );
  border-radius: 2.5rem;
  text-align: center;
  font-size: 1rem;
  font-family: Fira code;
  position: relative;
  z-index: 1;
  background-size: 400%;
}

.buttonFlash::before {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  content: "";
  background-image: linear-gradient(
    to right,
    #03a9f4,
    #f441a5,
    #ffeb3b,
    #09a8f4
  );
  filter: blur(1rem);
  z-index: -1;
  background-size: 400%;
}
.buttonFlash:hover {
  animation: sun 8s infinite;
}
.buttonFlash:hover::before {
  animation: sun 8s infinite;
}
@keyframes sun {
  100% {
    background-position: -400% 0;
  }
}
</style>
